package edu.neu.cs6515.util;

import lombok.EqualsAndHashCode;

/**
 * generic class of a pair.
 *
 * @param <X> type of the two elements in the pair
 */
@EqualsAndHashCode
public final class Pair<X> {

    private final X first;

    private final X second;

    /**
     * Initializes a pair with the two elements
     * @param first first element
     * @param second second element
     */
    public Pair(final X first, final X second) {
        this.first = first;
        this.second = second;
    }

    public X getFirst() {
        return first;
    }

    public X getSecond() {
        return second;
    }
}
